<?php
/* Artist Controller 
 * */

class ArtistsController extends Zend_Controller_Action
{
	public function listAction(){
		//$this->view->render('artists/list-all-artists.phtml');
		require_once APPLICATION_PATH . '/models/db/db.php';
		$db = db_db::db_con();
    	$sql_statement = "Select cn.categoryid as categoryid,cn.name as name 
    					from product p join categorynames cn on p.categoryid = cn.categoryid
    					and cn.localeid = 1
    					where p.isaccessory = 0 group by cn.name;";
    	$result = $db->query($sql_statement);
    	$this->_helper->viewRenderer->setNoRender();
    	foreach($result as $i){
    		echo $i['name']."<br/>";
    	}
	}
	
	
}

?>